﻿<Window x:Class="SDB.UploadDisplay"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sysIO="clr-namespace:System.IO;assembly=mscorlib"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:local="clr-namespace:SDB"
    Title="UploadDisplay" Height="450" Width="500">
    <Window.Resources>
        <ObjectDataProvider x:Key="getDrives"
                            MethodName="GetDrives"
                            ObjectType="{x:Type sysIO:DriveInfo}" />
        <local:GetFileSystemInformationConverter x:Key="getFileSystemInformationConverter" />
        
        <HierarchicalDataTemplate DataType="{x:Type sysIO:DriveInfo}" 
                                  ItemsSource="{Binding Converter={StaticResource getFileSystemInformationConverter}}">
            <StackPanel Orientation="Horizontal">
                <Image Width="20" Height="20" Stretch="Fill"
                       Source="images/diskdrive.png" />
                <TextBlock Text="{Binding Name}" Margin="5,0,0,0" />
            </StackPanel>
        </HierarchicalDataTemplate>
        
        <HierarchicalDataTemplate DataType="{x:Type sysIO:DirectoryInfo}"
                                  ItemsSource="{Binding Converter={StaticResource getFileSystemInformationConverter}}">
            <StackPanel Orientation="Horizontal">
                <Image Height="20" Width="20" Stretch="Fill" Source="images/folder.png" />
                <TextBlock Text="{Binding Name}" Margin="5,0,0,0" />
            </StackPanel>
        </HierarchicalDataTemplate>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
        </Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
            <ColumnDefinition Width="5" />
            <ColumnDefinition />
            <ColumnDefinition Width="5" />
            <ColumnDefinition />
		</Grid.ColumnDefinitions>
        <Border Grid.Row="0" Grid.Column="0" BorderThickness="2,2,2,2" CornerRadius="4,4,4,4" BorderBrush="Black" Margin="4,4,4,4" >
            <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="2,2,2,2">
                <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" DataContext="{StaticResource getDrives}">
                    <TreeView x:Name="tvwFolders" Margin="2,2,2,2" BorderThickness="0,0,0,0" ItemsSource="{Binding}" SelectedItemChanged="tvwFolders_SelectedItemChanged">
                    </TreeView>
                </StackPanel>
            </ScrollViewer>
        </Border>
        <GridSplitter Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
        <Border Grid.Row="0" Grid.Column="2" BorderThickness="2,2,2,2" CornerRadius="4,4,4,4" BorderBrush="Black" Margin="4,4,4,4"> 
            <Grid>
                <ListBox x:Name="lstLocalFiles">
                    
                </ListBox>
		    </Grid>
        </Border>
        <GridSplitter Grid.Row="0" Grid.Column="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
        <Border Grid.Row="0" Grid.Column="4" BorderThickness="2,2,2,2" CornerRadius="4,4,4,4" BorderBrush="Black" Margin="4,4,4,4">
            <Grid>
                
            </Grid>
        </Border>
    </Grid>
</Window>
